//
//  TestWebVC.swift
//  CooperSwift_Example
//
//  Created by 计海峰 on 2021/6/11.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import UIKit
import CooperSwift

class TestWebVC: BaseWKWebVC {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        addSwiftMethod(method: "callbackHandle")
        addSwiftMethod(method: "callbackHandle2")
        addSwiftMethod(method: "callUp")
        // Do any additional setup after loading the view.
        navigationItem.rightBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: .done, target: self, action: #selector(test))
        // Do any additional setup after loading the view.
    }
    
    @objc func test() {
        doJSMethod(method: "changeHead()")
    }
    
    @objc func callbackHandle(_ params: Any) {
        print(params)
    }
    
    
    @objc func callUp(_ params: Any) {
        print(params)
    }
    
    @objc func callbackHandle2(_ params: Any) {
        print(params)
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
